﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Survey.Models
{
    public class Admin
    {
        public long Id { get; set; }
        /// <summary>
        ///角色ID
        /// </summary>
        public long RoleId { get; set; }
        /// <summary>
        /// 管理员用户名，系统管理帐号，不可重复
        /// </summary>
        public string Account { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string? TrueName { get; set; }

        /// <summary>
        /// 微信OpenID
        /// </summary>
        public string? OpenId { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        public string? Phone { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string? Email { get; set; }
        /// <summary>
        /// 锁定状态，0：未锁定，1：临时锁定 2：长期未登陆锁定 3：永久锁定
        /// </summary>
        public int? LockState { get; set; } = 0;
        /// <summary>
        /// 帐号解锁时间
        /// </summary>
        public DateTime? UnLockTime { get; set; }
        /// <summary>
        /// 登陆失败次数
        /// </summary>
        public int FailTimes { get; set; } = 0;

        /// <summary>
        /// 是否删除 1为删除，0为未删除
        /// </summary>
        public int IsDelete { get; set; } = 0;
        /// <summary>
        /// 帐号添加时间
        /// </summary>
        public DateTime AddTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 备注
        /// </summary>
        public string? Tips { get; set; }
        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime? LastLoginTime { get; set; }
    }
}
